{include file="./public/footer" /}
{include file="./public/menu" /}
<!--引入kindeditor编辑器-->
<script src="__STATIC__/Admin/kindeditor/kindeditor-all.js"></script>
<!--/sidebar-->
<!--<style type="text/css">-->
<!--.planea,.planeb,.planec{-->
<!--display: none;-->
<!--}-->
<!--.plane_block{-->
<!--display: block;-->
<!--}-->
<!--</style>-->
<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i>
            <a href="/admin.php">首页</a>
            <span class="crumb-step">&gt;</span>
            <a class="crumb-name" href="/admin.php/plane/lists">航班管理</a>
            <span class="crumb-step">&gt;</span><span>新增航班</span></div>
    </div>
    <div class="result-wrap">
        <div class="result-content">
            <form  id="andy_form"  name="myform" enctype="multipart/form-data">
                <table class="insert-tab" width="100%">
                    <tbody>
                    <tr  class="plane_class_use">
                        <th><i class="require-red">*</i>航班名称：</th>
                        <td>
                            <input type="hidden" name="id" value="{$plane['id']}">
                            <input class="common-text required"  name="title" size="50"  type="text" value="{$plane['title']}">
                        </td>
                    </tr>

                    <tr>
                        <th width="120"><i class="require-red">*</i>分类：</th>
                        <td>
                            <select name="cid" id="class_id" class="required">
                                <option value="0">请选择</option>
                                <option value="1" {if ($plane.cid eq 1)}selected{/if}>长滩岛机票</option>
                                <option value="2" {if ($plane.cid eq 2)}selected{/if}>长滩岛酒店</option>
                                <option value="3" {if ($plane.cid eq 3)}selected{/if}>薄荷岛机票</option>
                                <option value="4" {if ($plane.cid eq 4)}selected{/if}>薄荷岛酒店</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>封面图</th>
                        <td>
                            <input id="file_upload"  type="file" multiple="true" >
                            <img style="display: none" id="upload_org_code_img" src="{$plane['cover']}" width="150" height="150">
                            <input id="file_upload_image" name="cover" type="hidden" multiple="true" value="{$plane['cover']}">
                        </td>
                    </tr>
                    <tr>
                        <th>详情：</th>
                        <td><textarea name="des" class="common-textarea" id="kindeditor_id" cols="30" style="width: 98%;" rows="10">{$plane['des']}</textarea></td>
                    </tr>

                    <tr>
                        <th><i class="require-red">*</i>航班状态：</th>
                        <td>
                            &nbsp;<input type="radio"  value="1" size="85" name="status" class="common-text" {if ($plane.status eq 1)}checked{/if}>正常&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;<input type="radio" value="0" name="status" size="85" class="commont-text" {if ($plane.status eq 0)}checked{/if}>代审
                        </td>
                    </tr>

                    <tr>
                        <th></th>
                        <td>
                            <input class="btn btn-primary btn6 mr10" id="andy_button_submit" value="提交" type="button">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        </td>
                    </tr>
                    </tbody></table>
            </form>
        </div>
    </div>

</div>
<!--/main-->
<script>
    KindEditor.ready(function(K) {
        window.editor = K.create('#kindeditor_id',{
            uploadJson : '/admin.php/image/kindUpload',
            afterBlur: function(){this.sync();}
        });
    });

    var SCOPE = {
        'save_url' : '/admin.php/plane/add',
        'jump_url' : '/admin.php/plane/lists',
        'ajax_upload_swf' : "__STATIC__/Admin/uploadify/uploadify.swf",
        'ajax_upload_image_url' : '/admin.php/image/ajaxUploadImage',
    }
    var thumb = "{$plane.cover}";
    if(thumb){
        $("#upload_org_code_img").show();
    }
</script>
<script>
    //图片上传
    $(function(){
        $('#thumb').uploadify({
            buttonClass : 'bgred',
            buttonText : '上传图片',
            height : 30,
            fileTypeDesc : 'Image Files',
            fileObjName : 'file',
            //允许上传的图片后缀
            fileTypeExts : '*.gif;*.jpg;*.png;*.jpeg',
            swf : "__STATIC__/Admin/uploadify/uploadify.swf",
            uploader : "{:url('plane/ajaxUploadImage',['tpl'=>'thumb'])}",
            width :120,
            onUploadSuccess : function(file,data,response){

                $("#thumbBox").append(data);
            }
        })
    })
</script>
{include file="./public/bottom" /}